<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PyScript with Pandas</title>
    <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css">
</head>
<body>
    <script defer src="https://pyscript.net/latest/pyscript.js"></script>

    <h1>Using pandas with PyScript</h1>

    <py-script>
        import asyncio              
        from pyodide.http import pyfetch
        import micropip

        async def main():
            await micropip.install("pandas")
            import pandas as pd
            data = {'Name': ['John', 'Anna', 'Peter', 'Linda'],
                    'Age': [28, 24, 35, 32]}
            df = pd.DataFrame(data)
            print(df)

        asyncio.ensure_future(main())
    </py-script>
</body>
</html>